<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class RequestUtils</title>
			<link rel="stylesheet" href="../../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Class RequestUtils</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
															<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">RequestUtils class</p>
<p class="description"><p>General purpose utility methods related to processing a servlet request  in the Struts controller framework.</p><p></p></p>
		<p class="notes">
			Located in <a class="field" href="_mvc---util---RequestUtils.php.html">/mvc/util/RequestUtils.php</a> (line <span class="field">40</span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>




	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
												<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
												<div class="method-definition">
					static 						<span class="method-result"><a href="../../php-mvc/action/ActionForm.html">ActionForm</a></span>
										<a href="#createActionForm" title="details" class="method-name">createActionForm</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">$request</span>, <span class="var-type"><a href="../../php-mvc/ActionConfig.html">ActionConfig</a></span>&nbsp;<span class="var-name">$mapping</span>, <span class="var-type"><a href="../../php-mvc/ModuleConfig.html">ModuleConfig</a></span>&nbsp;<span class="var-name">$moduleConfig</span>, <span class="var-type">servlet</span>&nbsp;<span class="var-name">3</span>)
									</div>
																<div class="method-definition">
					static 						<span class="method-result">context-relative</span>
										<a href="#forwardURL" title="details" class="method-name">forwardURL</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">$request</span>, <span class="var-type"><a href="../../php-mvc/ForwardConfig.html">ForwardConfig</a></span>&nbsp;<span class="var-name">$forward</span>, <span class="var-type"><a href="../../php-mvc/ModuleConfig.html">ModuleConfig</a></span>&nbsp;<span class="var-name">$moduleConfig</span>, [<span class="var-type"></span>&nbsp;<span class="var-name">$redirect</span> = <span class="var-default">false</span>])
									</div>
																<div class="method-definition">
					static 						<span class="method-result">current</span>
										<a href="#getUserLocale" title="details" class="method-name">getUserLocale</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">$request</span>, <span class="var-type">locale</span>&nbsp;<span class="var-name">$locale</span>)
									</div>
																<div class="method-definition">
					static 						<span class="method-result">void</span>
										<a href="#lookupActionForm" title="details" class="method-name">lookupActionForm</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">$request</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$attribute</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$scope</span>)
									</div>
																<div class="method-definition">
					static 						<span class="method-result">void</span>
										<a href="#populate" title="details" class="method-name">populate</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">&$form</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$request</span>)
									</div>
								
																																												</div>
		</div>
	</div>		

	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
																<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>
<a name="methodcreateActionForm" id="createActionForm"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">static method createActionForm</span> (line <span class="line-number">57</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">&lt;p&gt;Create (if necessary) and return an <div class="src-code"><ol><li><div class="src-line"><span class="src-id"><a href="../../php-mvc/action/ActionForm.html">ActionForm</a></span></div></li>
</ol></div> instance  appropriate for this request.  If no <div class="src-code"><ol><li><div class="src-line"><span class="src-id"><a href="../../php-mvc/action/ActionForm.html">ActionForm</a></span></div></li>
</ol></div> instance  is required, return <div class="src-code"><ol><li><div class="src-line"><span class="src-id">null</span></div></li>
</ol></div>.&lt;/p&gt;</p>
	<ul class="tags">
				<li><span class="field">return:</span> instance associated with this request</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
	    static
		<span class="method-result"><a href="../../php-mvc/action/ActionForm.html">ActionForm</a></span>
		<span class="method-name">
			createActionForm
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$request</span>, <span class="var-type"><a href="../../php-mvc/ActionConfig.html">ActionConfig</a></span>&nbsp;<span class="var-name">$mapping</span>, <span class="var-type"><a href="../../php-mvc/ModuleConfig.html">ModuleConfig</a></span>&nbsp;<span class="var-name">$moduleConfig</span>, <span class="var-type">servlet</span>&nbsp;<span class="var-name">3</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">servlet</span>
				<span class="var-name">3</span><span class="var-description">: The action servlet</span>			</li>
					<li>
				<span class="var-type">request</span>
				<span class="var-name">$request</span><span class="var-description">: The servlet request we are processing</span>			</li>
					<li>
				<span class="var-type">mapping</span>
				<span class="var-name">$mapping</span><span class="var-description">: The action mapping for this request</span>			</li>
					<li>
				<span class="var-type">moduleConfig</span>
				<span class="var-name">$moduleConfig</span><span class="var-description">: The configuration for this module</span>			</li>
				</ul>
		
			
	</div>
<a name="methodforwardURL" id="forwardURL"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">static method forwardURL</span> (line <span class="line-number">242</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">&lt;p&gt;Return the context-relative URL that corresponds to the specified  <div class="src-code"><ol><li><div class="src-line"><span class="src-id"><a href="../../php-mvc/ForwardConfig.html">ForwardConfig</a></span></div></li>
</ol></div>. The URL is calculated based on the  properties of the <a href="../../php-mvc/ForwardConfig.html">ForwardConfig</a> instance as follows:&lt;/p&gt;</p>
<p class="description"><p><ul><li>If the <div class="src-code"><ol><li><div class="src-line"><span class="src-id">contextRelative</span></div></li>
</ol></div> property is set, it is assumed
 that the <div class="src-code"><ol><li><div class="src-line"><span class="src-id">path</span></div></li>
</ol></div> property contains a path that is already
 context-relative: <ul><li>If the <div class="src-code"><ol><li><div class="src-line"><span class="src-id">path</span></div></li>
</ol></div> property value starts with a slash, it is
 returned unmodified.</li><li>If the <div class="src-code"><ol><li><div class="src-line"><span class="src-id">path</span></div></li>
</ol></div> property value
 does not start with a slash, a slash is prepended.</li></ul></li><li>Acquire the <div class="src-code"><ol><li><div class="src-line"><span class="src-id">forwardPattern</span></div></li>
</ol></div> property from the
 <div class="src-code"><ol><li><div class="src-line"><span class="src-id"><a href="../../php-mvc/ControllerConfig.html">ControllerConfig</a></span></div></li>
</ol></div> for the application module used to
 process this request. If no pattern was configured, default to a
 pattern of <div class="src-code"><ol><li><div class="src-line"><span class="src-var">$M$P</span></div></li>
</ol></div>, which is compatible with the hard-coded
 mapping behavior in Struts 1.0.</li><li>Process the acquired <div class="src-code"><ol><li><div class="src-line"><span class="src-id">forwardPattern</span></div></li>
</ol></div>, performing the
 following substitutions: <ul><li>&lt;strong&gt;$M&lt;/strong&gt; - Replaced by the
 module prefix for the application module processing this request.</li><li>&lt;strong&gt;$P&lt;/strong&gt; - Replaced by the <div class="src-code"><ol><li><div class="src-line"><span class="src-id">path</span></div></li>
</ol></div> property of
 the specified <a href="../../php-mvc/ForwardConfig.html">ForwardConfig</a>, prepended with a slash if it does
 not start with one.</li><li>&lt;strong&gt;$$&lt;/strong&gt; - Replaced by a single dollar sign
 character.</li><li>&lt;strong&gt;$x&lt;/strong&gt; (where &quot;x&quot; is any charater not listed above) -
 Silently omit these two characters from the result value.  (This has
 the side effect of causing all other $+letter combinations to be
 reserved.)</li></ul></li></ul></p></p>
	<ul class="tags">
				<li><span class="field">return:</span> URL</li>
				<li><span class="field">since:</span> Struts 1.2</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
	    static
		<span class="method-result">context-relative</span>
		<span class="method-name">
			forwardURL
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$request</span>, <span class="var-type"><a href="../../php-mvc/ForwardConfig.html">ForwardConfig</a></span>&nbsp;<span class="var-name">$forward</span>, <span class="var-type"><a href="../../php-mvc/ModuleConfig.html">ModuleConfig</a></span>&nbsp;<span class="var-name">$moduleConfig</span>, [<span class="var-type"></span>&nbsp;<span class="var-name">$redirect</span> = <span class="var-default">false</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">request</span>
				<span class="var-name">$request</span><span class="var-description">: The servlet request we are processing</span>			</li>
					<li>
				<span class="var-type">forward</span>
				<span class="var-name">$forward</span><span class="var-description">: ForwardConfig to be evaluated</span>			</li>
					<li>
				<span class="var-type">moduleConfig</span>
				<span class="var-name">$moduleConfig</span><span class="var-description">: Base forward on this module config.</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$redirect</span>			</li>
				</ul>
		
			
	</div>
<a name="methodgetUserLocale" id="getUserLocale"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">static method getUserLocale</span> (line <span class="line-number">340</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">&lt;p&gt;Look up and return current user locale, based on the specified  parameters.&lt;/p&gt;</p>
	<ul class="tags">
				<li><span class="field">return:</span> user locale</li>
				<li><span class="field">since:</span> Struts 1.2</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
	    static
		<span class="method-result">current</span>
		<span class="method-name">
			getUserLocale
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$request</span>, <span class="var-type">locale</span>&nbsp;<span class="var-name">$locale</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">request</span>
				<span class="var-name">$request</span><span class="var-description">: The request used to lookup the Locale</span>			</li>
					<li>
				<span class="var-type">locale</span>
				<span class="var-name">$locale</span><span class="var-description">: Name of the session attribute for our user's Locale.  If                 this is <div class="src-code"><ol><li><div class="src-line"><span class="src-id">null</span></div></li>
</ol></div>, the default locale key is                 used for the lookup.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodlookupActionForm" id="lookupActionForm"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">static method lookupActionForm</span> (line <span class="line-number">167</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
	    static
		<span class="method-result">void</span>
		<span class="method-name">
			lookupActionForm
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$request</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$attribute</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$scope</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"><a href="../../http/Request.html">Request</a></span>
				<span class="var-name">$request</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$attribute</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$scope</span>			</li>
				</ul>
		
			
	</div>
<a name="methodpopulate" id="populate"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">static method populate</span> (line <span class="line-number">114</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
	    static
		<span class="method-result">void</span>
		<span class="method-name">
			populate
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">&$form</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$request</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">&$form</span>			</li>
					<li>
				<span class="var-type"><a href="../../http/Request.html">Request</a></span>
				<span class="var-name">$request</span>			</li>
				</ul>
		
			
	</div>

						
		</div>
	</div>


	<p class="notes" id="credit">
		Documentation generated on Fri, 08 Feb 2008 14:32:42 +0200 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.0</a>
	</p>
	</div></body>
</html>